<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>餐桌二维码信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
        <shiro:hasPermission name="basedata:tableQrCode:edit">
		function createCode(){
			var length = document.getElementById("length").value;
			if(length == ''){
				layer.msg('请输入生成二维码的个数', {
					time: 3000 //2s后自动关闭
					 });
				return;
			}
			if(length>300){
				layer.msg('一次不能超过30个二维码', {
					time: 3000 //2s后自动关闭
					 });
				return;
			}
			window.location.href='${ctx}/basedata/tableQrCode/batchCreate?length='+length;
		}
		
        </shiro:hasPermission>
	</script>
</head>
<body>
	<ul class="nav nav-tabs nav-tabss">
		<!--<li><a href="${ctx}/basedata/tableQrCode/">餐桌二维码信息列表</a></li>
		 <li><a href="${ctx}/basedata/tableQrCode/form?id=${tableQrCode.id}">餐桌二维码信息<shiro:hasPermission name="basedata:tableQrCode:edit">${not empty tableQrCode.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="basedata:tableQrCode:edit">查看</shiro:lacksPermission></a></li> -->
		<shiro:hasPermission name="basedata:tableQrCode:edit"><li class="active"><a href="${ctx}/basedata/tableQrCode/initCreateQrCode">批量生成二维码</a></shiro:hasPermission></li>
	</ul>
	   <label>生成数量：</label>
      <input id="length" htmlEscape="false" />
		&nbsp;<input id="create" class="btn btn-sm btn-primary" onclick="createCode()" type="button" value="生成二维码"/>
</body>
</html>
